import { postAxios, getAxios, postDownloadAxios } from '@/lib/http';

export const engineApi = {
    // 添加发动机 @author 何杺
    addEngine: (data) => {
        return postAxios('/engine/add', data);
    },
    // 分页查询发动机 @author 何杺
    queryEngine: (data) => {
        return postAxios('/engine/page/query', data);
    },
    // 获取发动机详情
    getById: (data) => {
        return getAxios(`/engine/getById/${data}`);
    },
    // 批量删除发动机 @author 何杺
    batchDeleteEngine: (idList) => {
        return postAxios('/engine/deleteByIds', idList);
    },
    // 修改发动机  @author 何杺
    updateEngine: (data) => {
        return postAxios('/engine/update',data);
    },
    // 导出全部  @author 何杺
    exportAll:(data)=>{
        return postDownloadAxios('/engine/export/all',data);
    },
    // 批量导出  @author 何杺
    batchExport: (idList) => {
        return postDownloadAxios('/engine/export/batch', idList);
    },
};
